package com.gewu.core.db

import android.content.Context
import com.gewu.bluetoothflow.db.DeviceInfoBeanDao


public class  GewuDataBaseUtils {
    private constructor()
    companion object {
        var gewuDataBaseUtils: GewuDataBaseUtils? = null
        var db: GwAppDataBase? = null
        fun getInstance(context: Context): GewuDataBaseUtils {
            if (db == null && gewuDataBaseUtils == null) {
                gewuDataBaseUtils = GewuDataBaseUtils()
                db = GwAppDataBase.newInstance(context)
            }
            return gewuDataBaseUtils!!
        }
    }

   fun deviceInfoDao(): DeviceInfoBeanDao
   {
      return db!!.deviceInfoDao()
   }


}